import request from '@/utils/myrequest'
// 初始化信息
export function getInitList(kvs) {
  return request({
    url: '/mtms/MaterialInfo/GetList',
    method: 'get',
    kvs
  })
}

export function getInfo(kvs) {
  return request({
    url: '/mtms/MaterialInfo/Get',
    method: 'get',
    kvs
  })
}

// 新增
export function doAdd(kvs) {
  return request({
    url: '/mtms/MaterialInfo/Add',
    method: 'POST',
    kvs
  })
}

// 编辑
export function doUpdate(kvs) {
  return request({
    url: '/mtms/MaterialInfo/Update',
    method: 'POST',
    kvs
  })
}

// 删除
export function doDelete(kvs) {
  return request({
    url: '/mtms/MaterialInfo/Delete',
    method: 'POST',
    kvs
  })
}

// 获取材料类型
export function getMaterialTypes(kvs) {
  return request({
    url: '/mtms/MaterialType/GetAllType',
    method: 'get',
    kvs
  })
}
// 获取供应商
export function getSuppliers(kvs) {
  return request({
    url: '/config/Supplier/GetIDAndName',
    method: 'get',
    kvs
  })
}

export function startCountDown(kvs) {
  return request({
    url: '/mtms/MaterialInfo/StartCountDown',
    method: 'POST',
    kvs
  })
}
